﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace GoFishWeb.Models
{
    public class GoFishBook
    {
        public GoFishBook()
        {
            // needed for entity framework.  Must be no parameters and can not be private
        }

        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }

        public CardRank Rank { get; set; }

        public string PlayerName { get; set; }

        public GoFishGame Game { get; set; }

        public override string ToString()
        {
            return string.Format("{0} has a book of {1}.", PlayerName, Card.Plural(Rank));
        }
    }
}